package com.ruoyi.im.service.impl;

import com.ruoyi.common.support.Convert;
import com.ruoyi.im.domain.GroupNickname;
import com.ruoyi.im.mapper.GroupNicknameMapper;
import com.ruoyi.im.service.IGroupNicknameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 群昵称 服务层实现
 * 
 * @author lxs
 * @date 2018-11-08
 */
@Service
public class GroupNicknameServiceImpl implements IGroupNicknameService 
{
	@Autowired
	private GroupNicknameMapper groupNicknameMapper;

	/**
     * 查询群昵称信息
     * 
     * @param id 群昵称ID
     * @return 群昵称信息
     */
    @Override
	public GroupNickname selectGroupNicknameById(Long id)
	{
	    return groupNicknameMapper.selectGroupNicknameById(id);
	}
	
	/**
     * 查询群昵称列表
     * 
     * @param groupNickname 群昵称信息
     * @return 群昵称集合
     */
	@Override
	public List<GroupNickname> selectGroupNicknameList(GroupNickname groupNickname)
	{
	    return groupNicknameMapper.selectGroupNicknameList(groupNickname);
	}
	
    /**
     * 新增群昵称
     * 
     * @param groupNickname 群昵称信息
     * @return 结果
     */
	@Override
	public int insertGroupNickname(GroupNickname groupNickname)
	{
	    return groupNicknameMapper.insertGroupNickname(groupNickname);
	}
	
	/**
     * 修改群昵称
     * 
     * @param groupNickname 群昵称信息
     * @return 结果
     */
	@Override
	public int updateGroupNickname(GroupNickname groupNickname)
	{
	    return groupNicknameMapper.updateGroupNickname(groupNickname);
	}

	/**
     * 删除群昵称对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteGroupNicknameByIds(String ids)
	{
		return groupNicknameMapper.deleteGroupNicknameByIds(Convert.toStrArray(ids));
	}
	
}
